package com.hsy.crm.web.web.finance;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.ReceiptOrder;
import com.hsy.crm.web.domain.vo.receiptOrder.ReceiptInsertVo;
import com.hsy.crm.web.domain.vo.receiptOrder.ReceiptOrderOrderPageVo;
import com.hsy.crm.web.domain.vo.receiptOrder.ReceiptOrderPageVo;
import com.hsy.crm.web.service.impl.ReceiptOrderService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/receipt")
public class ReceiptOrderAction extends BaseAction {

    @Autowired
    ReceiptOrderService receiptOrderService;

    @RequestMapping("/insert")
    public String insert(ReceiptInsertVo vo) {
        return Response.body(receiptOrderService.insertReceiptOrder(vo));
    }

    @RequestMapping("/update")
    public String update(ReceiptInsertVo vo) {
        return Response.body(receiptOrderService.updateReceiptOrder(vo));
    }

    @RequestMapping("/delete")
    public String delete(ReceiptOrder receiptOrder) {
        return Response.body(receiptOrderService.deleteReceiptOrder(receiptOrder));
    }

    @RequestMapping("/select")
    public String select(ReceiptOrder receiptOrder) {
        return Response.body(receiptOrderService.select(receiptOrder));
    }

    @RequestMapping("/getOrder")
    public String getOrder(ReceiptOrder receiptOrder) {
        return Response.body(receiptOrderService.getOrder(receiptOrder));
    }

    @RequestMapping("/page")
    public String page(ReceiptOrderPageVo receiptOrderPageVo) {
        return Response.body(receiptOrderService.page(receiptOrderPageVo));
    }

    @RequestMapping("/orderPage")
    public String orderPage(ReceiptOrderOrderPageVo vo) {
        return Response.body(receiptOrderService.orderPage(vo));
    }

    @RequestMapping("/examine")
    public String examine(ReceiptOrder order) {
        return Response.body(receiptOrderService.examine(order));
    }

    @RequestMapping("/invalid")
    public String doInvalid(ReceiptOrder order) {
        return Response.body(receiptOrderService.doInvalid(order));
    }

}
